<?php
use yii\helpers\Html;
use yii\helpers\Url;
use app\lib\WeixinUtils;

/* @var $this yii\web\View */
/* @var $content string 字符串 */


$web = Url::to("@web");

$link = Url::home(true) . '/';

?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>首页</title>
    <link type="text/css" href="<?= $web ?>/css/bag/home.css" rel="stylesheet"/>
    <link type="text/css" href="<?= $web ?>/css/bag/global.css" rel="stylesheet"/>
    <style type="text/css">
    </style>
    <script type="text/javascript" src="<?= $web ?>/js/jquery.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var w = $(window).width();
            if (w > 640) {
                w = 640;
            }
            $("body").css("font-size", w * 20 / 320);

            $(".main").css("height", $(window).height());
            $(".mask-frame .mask").css("height", $(window).height());

//            var scale = $(document).height() / $(document).width();
//            alert(scale);
//            if (scale <= 1.5) {
//                $(".frame").css("top", "182px");
//                $(".mask-frame .content").css("top", "5.5em");
//            } else {
//                var t = (scale - 1.5) * 100;
//                $(".top").css("top", t);
//                $(".frame").css("top", 182 + t);
//            }
        });

        function showMask() {
            $(".mask-frame").show();
        }

        function hideMask() {
            $(".mask-frame").hide();
        }

        function link(href) {
            window.location.href = "<?= $link ?>" + href;
        }
    </script>
</head>
<body>
<div class="main" style="background-image: url('<?= $web ?>/img/bag/home_image/home-bg.png')">
    <img class="top" src="<?= $web ?>/img/bag/home_image/top.png">
    <div class="frame">
        <img src="<?= $web ?>/img/bag/home_image/home-msg.png">
        <img src="<?= $web ?>/img/bag/home_image/home-btn-1.png" onclick="link('wx-home/home')">
        <img src="<?= $web ?>/img/bag/home_image/home-btn-2.png" onclick="link('wx-biz/card-list')">
        <img onclick="showMask()" src="<?= $web ?>/img/bag/home_image/home-txt.png">
    </div>
    <div class="mask-frame">
        <div class="mask"></div>
        <img class="content" src="<?= $web ?>/img/bag/home_image/mask-content.png">
        <img class="btn-close" onclick="hideMask()" src="<?= $web ?>/img/bag/home_image/mask-btn-close.png">
    </div>
</div>

</body>
</html>
